//
//  HttpTools.h
//  MIcroBlog
//
//  Created by zhoupengfei on 15/2/12.
//  Copyright (c) 2015年 zpf. All rights reserved.
//

#import <Foundation/Foundation.h>

// 宏定义

//192.168.1.182:8080
//192.168.100.15:8080
#define BaseURL @"http://61.164.105.25:8082/IOSWZSLJOA/jh/"
//http://61.164.105.22:8080/IOSWZSLJOA/jh/exchkind

#define KexchexchangeURL @"exchexchange"

//代收文件列表,代收文件签收，已收文件,已发文件列表
#define KexchexchangeURL @"exchexchange"

//已收搜索,已发搜索,代收搜索
#define KexchangeSubstanceURL @"exchangeSubstance"

#define KexchSearch @"exchSearch"


#define Kexchother @"exchother"

//登录，代办列表，在办工作列表，最新发文列表,最新收文列表
//发件箱列表，收件箱列表，科室发件箱列表，科室收件箱列表接口
//近期公告列表，期刊信息列表
#define KexchURL @"exch"

//代办读取更多，代办文档流转历史,在办读取更多,最新发文读取更多，最新发文记录阅读
//最新收文读取更多，最新收文详细内容接口，最新收文阅读记录，最新收文显示阅读记录
//近期公告阅读记录，近期公告更多
#define KexchgeneralURL @"exchgeneral"

//代办文档详细信息,保存，选择环节，选择人员接口，确定发送接口
#define KexchdataURL @"exchdata"

//发件箱读取更多，发件箱详细内容接口,邮件新建发送接口，邮件人员选择接口
//收件箱读取更多，收件箱详细内容接口，转发邮件接口，邮件阅读接口，回复邮件接口
#define KexchmailURL @"exchmail"

#define Kexchmain @"exchmain"


#define KexchleaderURL @"exchleader"

//科室发件箱读取更多接口，科室发件箱详细内容接口，科室邮件新建发送接口
//科室邮件人员选择接口，科室收件箱读取更多接口，科室邮件阅读接口，科室回复邮件接口
#define Kexchksmail @"exchksmail"

//待办收文更多
#define KexchpageURL @"exchpage"

#define Kexchrecent @"exchrecent"

#define Kexchlogistics @"exchlogistics"

#define KExchkindURL @"exchkind"
#define KExchTree @"exchTree"

#define Kexcharchive @"excharchive"

#define Kexchleader @"exchleader"

//待办收文读取更多
#define KTodoSwPageMethod @"todoSwPage"

#define KTodoFwPageMethod @"todoFwPage"

#define KGetOaOfficeMethod @"getOaOffice"


#define KContentTxlMethod @"contentTxl"

//登录方法
#define KLoginMethod @"validationUser"

//首页代办件数及权限控制
#define KhomePqwoiunuMethod @"homePqwoiunu"


#define KhomeMailwoiunu @"homeMailwoiunu"

//代收文件列表
#define KexhcangePageMethod @"exhcangePage"

//代收文件签收
#define KsignExhcangeMethod @"signExhcange"

//已收文件
#define KreceivedExhcangePageMethod @"receivedExhcangePage"

//已收搜索
#define KReceivedSearchMethod @"ReceivedSearch"

//已发文件列表
#define KsendExhcangePageMethod @"sendExhcangePage"

//已发搜索
#define KPostedSearchMethod @"PostedSearch"

//代收搜索
#define KCollectSearchMethod @"CollectSearch"

//代办列表
#define KreceiveMethod @"receive"

//待办读取更多
#define KTodoPagdMethod @"todoPage"

//代办文档详细信息接口
#define KGetOAOfficeMethod @"getOaOffice"

//代办文档流转历史
#define KroamHistoryMethod @"roamHistory"

//保存接口
#define KSetSaveWork @"setSaveWork"

//选择环节接口
#define KSetRetStaffList @"setRetStaffList"

//提交选择人员接口
#define KSetStaffListDeliVerMethod @"setStaffListDeliver"

//确定发送接口
#define KSetSubmitWorkMethod @"setSubmitWork"

//在办工作
#define KexistMethod @"exist"

//在办读取更多
#define KtozbPageMethod @"tozbPage"

//最新发文列表
#define KElectronicsNoticeMethod @"ElectronicsNotice"

//最新发文读取更多
#define KdipatchPageMethod @"dipatchPage"

//最新发文记录阅读，最新收文显示阅读记录
#define KlookRecordMethod @"lookRecord"

//最新收文列表
#define KNewInFileMethod @"NewInFile"

//最新收文读取更多
#define KInpageMethod @"inPage"

//最新收文详情，最新收文阅读记录
#define KContentInMethod @"contentIn"

//发件箱列表，收件箱列表接口，科室发件箱列表，科室收件箱列表接口
#define KElectronicsMailMethod @"ElectronicsMail"

//发件箱读取更多,科室发件箱读取更多
#define KMailPageMethod @"mailPage"

//发件箱详细接口，收件箱详细内容接口,科室发件箱详细内容
#define KContentMailMethod @"contentMail"

//邮件新建发送接口，转发邮件接口,回复邮件接口,科室邮件新建发送
//科室回复邮件接口
#define KSendMailMethod @"sendMail"

//邮件人员选择接口，科室邮件人员选择接口
#define KReturnTreeMethod @"returnTree"

//收件箱读取更多，科室收件箱读取更多
#define KOutboxMethod @"outboxPage"

//邮件阅读接口，科室邮件阅读接口
#define KwhetherReadMailMethod @"whetherReadMail"

//近期公告列表接口
#define KElectronicsNoticeMethod @"ElectronicsNotice"

//近期公告阅读记录接口
#define KContentElectronicsMethod @"contentElectronics"

//近期公告更多
#define KElectronicsPageMethod @"electronicsPage"

//期刊信息列表
#define KInfoBriefingFileMethod @"InfoBriefingFile"

//公文收件箱内容
#define KcontentExhcangeMethod @"contentExhcange"

//公文提交意见
#define KSetSubmitBumphMethod @"setSubmitBumph"

#define KSignInMeetRecord @"SignInMeetRecord" //会议阅读记录

//会议名单
#define KMeetNamelistMethod @"MeetNamelist"

//批事件回复
#define KInstructionsNamelist @"InstructionsNamelist"

#define KSignInRecord @"SignInRecord" // 公文，便函，批示件

#define KSetSubmitMeeting @"setSubmitMeeting"  // 2.1.9	会议提交意见

#define KSetSaveMeeting @"setSaveMeeting" //会议保存意见

#define KSetSubmitInstructions @"setSubmitInstructions" //批事件提交

#define KReadFilePage @"readFilePage"//待阅文件

#define kContentReadFile @"contentReadFile"//待阅文件详细内容

#define KSetSaveWork @"setSaveWork" //保存接口

#define KSetSignInMethod @"setSignIn" //签收

#define KMessagePageMethod @"messagePage"//短信已发列表
#define KAddressListPage @"addressListPage" //通讯录
#define KAdressListSearch @"adressListSearch" //通讯录搜索

#define KMessageSendMethod @"messageSend"
#define KGlobalTree @"globalTree"  //2.1.72	全县地址本单位接口
#define KDepTree @"depTree"
#define KDepTxlTree @"depTxlTree"
#define KLocalTree @"localTree"
#define KsTree @"KsTree"
#define KmailPage @"mailPage"
#define KGetDipatchDepMethod @"getDipatchDep" 

#define KreturnTree @"returnTree"

#define KDipatchDepPageMethod @"DipatchDepPage"

#define KinDepPage @"inDepPage"

#define KGetInDepMethod @"getInDep"

#define KgetFileYear @"getFileYear"

#define KgetLeader @"getLeader"

#define KTozbSwPage @"tozbSwPage"

#define KtozbFwPage @"tozbFwPage"

//收件箱列表
#define KoutboxPage @"outboxPage"

#define KdraftsPage @"draftsPage"

#define KdustbinPage @"dustbinPage"

#define KelectronicsPage @"electronicsPage"

#define KtoybFwPage @"toybFwPage"

#define KtoybSwPage @"toybSwPage"

#define KtoArchiveFwPage @"toArchiveFwPage"

#define KtoArchiveSwPage  @"toArchiveSwPage"

#define KgetArchiveOaOffice @"getArchiveOaOffice"

#define KleaderPage @"leaderPage"

#define KtoselectCanteenPage @"toselectCanteenPage"

#define KarchiveFilePage @"archiveFilePage"

#define KgetArichiveDoc @"getArichiveDoc"

#define KcontentLeader @"contentLeader"

#define KmessagePage @"messagePage"

#define KMessageSend @"messageSend"

#define KFilesDispatchSearch @"FilesDispatchSearch"

#define KFilesInSearch @"FilesInSearch"

#define KArchiveYearSearch @"ArchiveYearSearch"

#define KglobalTxlTree @"globalTxlTree"

#define kBmTxlTree @"BmTxlTree"

#define KBmRyTxlTree @"BmRyTxlTree "

#define KcontentTxl @"contentTxl"

#define KgetMeetDate @"getMeetDate"

#define KtoselectMeetPage @"toselectMeetPage"

#define KcontentMeet @"contentMeet"

#define KIpadHome @"homeIpad"

#define KPageSize 10



typedef void (^HttpSuccessBlock) (id JSON);
typedef void (^HttpFailureBlock) (NSError*error);
@interface HttpTools : NSObject

//XML
+(void)postWithURL:(NSString*)url arrays:(NSArray*)arrays  method:(NSString*)method success:(void(^)(id JSON))success failure:(void(^)(NSError *error))failure; //post请求

//JSON
+(void)requestWithURL:(NSString*)url arrays:(NSArray*)arrays  method:(NSString*)method success:(void(^)(id JSON))success failure:(void(^)(NSError *error))failure;//post请求


+(void)downFileWith:(NSString*)url success:(HttpSuccessBlock)success failure:(HttpFailureBlock)failure; //文件下载





@end
